import {
  AutoComplete,
  Card,
  Col,
  DatePicker,
  Form,
  Input,
  Row,
  Switch,
} from "antd";
import ComponentHeader from "../../../components/Page/ComponentHeader";

function PromoteAdd() {
  const [form] = Form.useForm();

  const onFinish = (values) => {
    console.log(values);
  };

  return (
    <Card>
      <ComponentHeader title="活动添加" marginBottom />
      <Form form={form} layout="vertical" onFinish={onFinish}>
        <Row gutter={24}>
          <Col span={12}>
            <Form.Item label="活动商品" name="goodName">
              <AutoComplete placeholder="请输入活动商品名称" />
            </Form.Item>
          </Col>
          <Col span={12}>
            <Form.Item label="活动价格" name="discountPrice">
              <Input placeholder="请输入活动价格" />
            </Form.Item>
          </Col>
        </Row>
        <Row gutter={24}>
          <Col span={12}>
            <Form.Item label="开始时间" name="startTime">
              <DatePicker
                style={{ width: "100%" }}
                showTime
                placeholder="请选择开始时间"
              />
            </Form.Item>
          </Col>
          <Col span={12}>
            <Form.Item label="结束时间" name="endTime">
              <DatePicker
                style={{ width: "100%" }}
                showTime
                placeholder="请选择结束时间"
              />
            </Form.Item>
          </Col>
        </Row>
        <Row gutter={24}>
          <Col span={12}>
            <Form.Item label="是否发布" name="isPublish">
              <Switch />
            </Form.Item>
          </Col>
          <Col span={12}></Col>
        </Row>
      </Form>
    </Card>
  );
}

export default PromoteAdd;
